These spew criticals when width == 0 || height == 0.
gtk_widget_get_content_size (widget, &width, &height);
- gtk_css_style_snapshot_icon (style,
- snapshot,
- width, height,
- self->image);
+ if (width > 0 && height > 0)
+ gtk_css_style_snapshot_icon (style,
+ snapshot,
+ width, height,
+ self->image);
}
static void
gtk_widget_get_content_size (widget, &width, &height);
- gtk_css_style_snapshot_icon (style,
- snapshot,
- width, height,
- GTK_CSS_IMAGE_BUILTIN_PANE_SEPARATOR);
+ if (width > 0 && height > 0)
+ gtk_css_style_snapshot_icon (style,
+ snapshot,
+ width, height,
+ GTK_CSS_IMAGE_BUILTIN_PANE_SEPARATOR);
return FALSE;
}
g_return_if_fail (GTK_IS_CSS_STYLE (style));
g_return_if_fail (snapshot != NULL);
+ if (width == 0.0 || height == 0.0)
+ return;
+
image = _gtk_css_image_value_get_image (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_ICON_SOURCE));
if (image == NULL)
return;